Integrand size = 19, antiderivative size = 143 \[ \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx=-\frac {b \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-m}{2},\frac {4-m}{2},\cos ^2(c+d x)\right ) \sec ^{-2+m}(c+d x) \sin (c+d x)}{d (2-m) \sqrt {\sin ^2(c+d x)}}-\frac {a \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-m}{2},\frac {3-m}{2},\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) \sin (c+d x)}{d (1-m) \sqrt {\sin ^2(c+d x)}} \]
-b*hypergeom([1/2, 1-1/2*m],[2-1/2*m],cos(d*x+c)^2)*sec(d*x+c)^(-2+m)*sin( d*x+c)/d/(2-m)/(sin(d*x+c)^2)^(1/2)-a*hypergeom([1/2, -1/2*m+1/2],[3/2-1/2 *m],cos(d*x+c)^2)*sec(d*x+c)^(-1+m)*sin(d*x+c)/d/(1-m)/(sin(d*x+c)^2)^(1/2 )
Time = 0.13 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.75 \[ \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx=\frac {\csc (c+d x) \left (b m \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1+m),\frac {1+m}{2},\sec ^2(c+d x)\right )+a (-1+m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(c+d x)\right )\right ) \sec ^{-1+m}(c+d x) \sqrt {-\tan ^2(c+d x)}}{d (-1+m) m} \]
(Csc[c + d*x]*(b*m*Cos[c + d*x]*Hypergeometric2F1[1/2, (-1 + m)/2, (1 + m) /2, Sec[c + d*x]^2] + a*(-1 + m)*Hypergeometric2F1[1/2, m/2, (2 + m)/2, Se c[c + d*x]^2])*Sec[c + d*x]^(-1 + m)*Sqrt[-Tan[c + d*x]^2])/(d*(-1 + m)*m)
Time = 0.50 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.421, Rules used = {3042, 3717, 3042, 4274, 3042, 4259, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^m(c+d x) (a+b \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^m \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3717 |
\(\displaystyle \int \sec ^{m-1}(c+d x) (a \sec (c+d x)+b)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^{m-1} \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+b\right )dx\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle a \int \sec ^m(c+d x)dx+b \int \sec ^{m-1}(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc \left (c+d x+\frac {\pi }{2}\right )^mdx+b \int \csc \left (c+d x+\frac {\pi }{2}\right )^{m-1}dx\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle a \cos ^m(c+d x) \sec ^m(c+d x) \int \cos ^{-m}(c+d x)dx+b \cos ^m(c+d x) \sec ^m(c+d x) \int \cos ^{1-m}(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \cos ^m(c+d x) \sec ^m(c+d x) \int \sin \left (c+d x+\frac {\pi }{2}\right )^{-m}dx+b \cos ^m(c+d x) \sec ^m(c+d x) \int \sin \left (c+d x+\frac {\pi }{2}\right )^{1-m}dx\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle -\frac {a \sin (c+d x) \sec ^{m-1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-m}{2},\frac {3-m}{2},\cos ^2(c+d x)\right )}{d (1-m) \sqrt {\sin ^2(c+d x)}}-\frac {b \sin (c+d x) \sec ^{m-2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-m}{2},\frac {4-m}{2},\cos ^2(c+d x)\right )}{d (2-m) \sqrt {\sin ^2(c+d x)}}\) |
-((b*Hypergeometric2F1[1/2, (2 - m)/2, (4 - m)/2, Cos[c + d*x]^2]*Sec[c + d*x]^(-2 + m)*Sin[c + d*x])/(d*(2 - m)*Sqrt[Sin[c + d*x]^2])) - (a*Hyperge ometric2F1[1/2, (1 - m)/2, (3 - m)/2, Cos[c + d*x]^2]*Sec[c + d*x]^(-1 + m )*Sin[c + d*x])/(d*(1 - m)*Sqrt[Sin[c + d*x]^2])
3.8.77.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p) Int[(d*Csc[e + f*x])^(m - n*p )*(b + a*Csc[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && !IntegerQ[m] && IntegersQ[n, p]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^(n - 1)*((Sin[c + d*x]/b)^(n - 1) Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
\[\int \left (a +\cos \left (d x +c \right ) b \right ) \left (\sec ^{m}\left (d x +c \right )\right )d x\]
\[ \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx=\int { {\left (b \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{m} \,d x } \]
\[ \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx=\int \left (a + b \cos {\left (c + d x \right )}\right ) \sec ^{m}{\left (c + d x \right )}\, dx \]
\[ \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx=\int { {\left (b \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{m} \,d x } \]
\[ \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx=\int { {\left (b \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{m} \,d x } \]
Timed out. \[ \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx=\int {\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m\,\left (a+b\,\cos \left (c+d\,x\right )\right ) \,d x \]